package cb.wzby;

import java.util.ArrayList;
import java.util.List;

public class ListDemo3 {
    public static void main(String[] args) {
        List<Integer> l1 = new ArrayList<>(List.of(1, 2, 3, 4, 5, 6, 3, 3, 3, 8, 5, 5, 5));
        System.out.println(l1);
        int a = l1.size();
        l1.removeAll(List.of(3));
        //3全部删除
        System.out.println(l1);
        System.out.println(a - l1.size());
        //int o = 5;
        //System.out.println(l1.get(o));
        int n = 0;
        for (int i = 0 ; i<l1.size() ; i++ ){
            if (l1.get(i) == 5){
                ++n;
            }
        }
        System.out.println(n);
    }
}
